﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ServiceModel;
using System.ServiceModel.Description;
using _430GroupProject;

namespace WebClient
{
    public partial class SiteMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           /* NetTcpBinding myBinding = new NetTcpBinding();
            //Used so we can recived larger messages from server.
            myBinding.MaxReceivedMessageSize = int.MaxValue;

            EndpointAddress addr = new EndpointAddress("net.tcp://localhost:8000/nspremo/Services");
            ChannelFactory<IEMSServices> factory = new ChannelFactory<IEMSServices>(myBinding, addr);

            //This loop is used to enable larger maximum transfer size.
            foreach (OperationDescription op in factory.Endpoint.Contract.Operations)
            {
                DataContractSerializerOperationBehavior dataContractBehavior = op.Behaviors.Find<DataContractSerializerOperationBehavior>() as DataContractSerializerOperationBehavior;
                if (dataContractBehavior != null)
                {
                    dataContractBehavior.MaxItemsInObjectGraph = 2147483647;
                }
            }
            IEMSServices proxy = factory.CreateChannel();*/

        }

        protected void CloseErrors_Click(object sender, EventArgs e)
        {
            ErrorMessages.Visible = false;
        }
    }
}
